\documentclass{article}

\begin{document}

%% Sections on Grammar Notation and Characters need to be written

\section{Characters}
  \subsection{Escape Sequences}
  

  \subsection{Comments}
  Comments begin with /* and go until the first */.

  \subsection{Whitespace}
  Whitespace is ignored.

\section{Identifiers}
    \subsection{Declaration}
    A valid identifier is represented by

        \begin{eqnarray*}
        Identifier &\rightarrow& ConstantIdentifier | RegularIdentifier \\
        ConstantIdentifier &\rightarrow& (UpperCaseLetter)+\\
        RegularIdentifier &\rightarrow&
        (Letter(Letter|Digit)*)?LowerCaseLetter(Letter|Digit)*
        \end{eqnarray*}

        %%Note: Need to write something for letters

    Identifiers are case sensitive. If an identifier is given a name with all capital letters
    then it is considered constant, and it cannot be assigned a new value.

        \paragraph{Reserved Words}
        The following words are reserved, and may not be used as
        identifiers:

            \begin{tabular}{lll}
            \centering
                    if&else&then\\
                    for&while&foreach\\
                    and&or&true\\
                    false&nil&in\\
                    def&defrow&deftable
            \end{tabular}


    \subsection{Scope}
    Identifiers are block scoped. They can only be accessed within
    the block in which they were declared, or in a child of that
    block. Identifiers which are declared within rows or tables can
    be accessed by any function called upon that row or table.

    \subsection{Type Definition}
    In order to help users who are new to computer programming,
    variables will be dynamically typed. Terms such as ``int", ``float",
    ``double", ``string", and ``boolean" may be confusing to the
    average user. Our language will automatically identify the
    difference between numbers and strings.

        \subsubsection{Numbers}
        A number will be represented by

            \begin{displaymath}
                Number \rightarrow Digit+(. Digit*)?
            \end{displaymath}
            %Should there be quotes around the dot since it means something in antlr,
            %or does that not matter because this isn't antlr, it's an lrm?

        \subsubsection{Strings}
        A string will begin with the first `` and end with the first
        unescaped ".

            \paragraph{Escape Sequences}

            \begin{itemize}
            \item \begin{verb} \t \end{verb} represents a tab
            \item \begin{verb} \n \end{verb} represents a newline
            \item \begin{verb} \" \end{verb} represents a double-quote
            \item \begin{verb} \\ \end{verb} represents a backslash
            \end{itemize}

    %%Note: NEED A SECTION ON ARRAYS


        \subsubsection{Examples}

            \begin{itemize}
            \item \begin{verbatim} header = "PEOPLE WHO LIKED THE BOOK \"GONE WITH THE WIND\" BY AGE
            GROUPS\n"; \end{verbatim}
            \item \begin{verbatim} mynum = 5 \end{verbatim}
            \item \begin{verbatim} mynum = 5.254 \end{verbatim}
            \item \begin{verbatim} PI = 3.14159265 /* PI is now a constant and its value cannot be changed */ \end{verbatim}
            \end{itemize}



\end{document}
